#ifndef _UTILS_HH_
#define _UTILS_HH_

#include <iostream>
#include <string>


#include "basic_utils.hh"
#include "SMATModel.hh"

std::string get_basename (const char * name);

IplImage * preprocess_image(const IplImage *src_img);

int init_model_shapes(boost::shared_ptr<SMATModel>& smat,
		      CvFileStorage* fs,
		      CvSeqReader& reader, const CvSeq* seq);

double calc_prob(double val, const CvMat *pdf_samples);
double calc_prob(double val, std::vector<double>pdf_samples);

int strtolower(char *dest, const char * ori);

#endif
